Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: overwrite symlinks when extracting tarballs #867

Merged
merged 28 commits into from
Jan 15, 2025

Conversation

Wwwsylvia
Copy link
Member

@Wwwsylvia Wwwsylvia commented Jan 8, 2025

  1. Fix the bug that symbolic links are not automatically overwritten when extracted from a tar archive to the File store.
  2. Rename some functions and variables for better readability.
  3. Add corresponding unit tests.
  4. Improve docs and error messages.

Fixes #865

content/file/utils.go Fixed Show fixed Hide fixed
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.03%. Comparing base (eeb21fc) to head (37eb7cd).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #867      +/-   ##
==========================================
+ Coverage   75.67%   76.03%   +0.35%     
==========================================
  Files          63       63              
  Lines        6011     6025      +14     
==========================================
+ Hits         4549     4581      +32     
+ Misses       1079     1064      -15     
+ Partials      383      380       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

content/file/utils.go Show resolved Hide resolved
content/file/utils.go Show resolved Hide resolved
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
@Wwwsylvia Wwwsylvia force-pushed the overwrite_file_links branch from 62aba2f to 9fb9f9e Compare January 9, 2025 10:20
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
content/file/utils.go Fixed Show fixed Hide fixed
content/file/utils.go Fixed Show fixed Hide fixed
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
content/file/utils.go Dismissed Show dismissed Hide dismissed
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
content/file/utils.go Outdated Show resolved Hide resolved
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
content/file/utils.go Dismissed Show dismissed Hide dismissed
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Wwwsylvia Wwwsylvia merged commit 1a9e250 into oras-project:main Jan 15, 2025
9 checks passed
@Wwwsylvia Wwwsylvia deleted the overwrite_file_links branch January 15, 2025 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: symbolic links are not automatically overwritten when extracted from tar archive to File store
3 participants